/**
 * @description User数据表
 * @author malin
 */

const seq = require('../seq')
const { STRING, DECIMAL } = require('../types')

const User = seq.define('user', {
    userName: {
        type: STRING,
        allowNull: false,
        unique: true,
        comment: '用户名唯一，不允许出现重复的'
    },
    password: {
        type: STRING,
        allowNull: false,
        comment: '用户密码'
    },
    nickName: {
        type: STRING,
        allowNull: false,
        comment: '用户昵称'
    },
    gender: {
        // 0~9
        type: DECIMAL,
        allowNull: false,
        defaultValue: 3,
        comment: '性别，1：男，2：女，3：保密'
    },
    picture: {
        type: STRING,
        comment: '用户头像'
    },
    city: {
        type: STRING,
        comment: '所在城市'
    }
})

module.exports = User
